.class Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;
.super Ljava/lang/Object;
.source "AlbumHistoryActivity.java"

# interfaces
.implements Lretrofit/Callback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->fetchData()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lretrofit/Callback",
        "<",
        "Lorg/json/JSONObject;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)V
    .registers 2
    .param p1, "this$0"    # Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    .prologue
    .line 199
    iput-object p1, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public failure(Lretrofit/RetrofitError;)V
    .registers 5
    .param p1, "error"    # Lretrofit/RetrofitError;

    .prologue
    const/4 v2, 0x0

    .line 233
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # setter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mIsRequesting:Z
    invoke-static {v0, v2}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$702(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;Z)Z

    .line 234
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # operator-- for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mPage:I
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$410(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)I

    .line 235
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # invokes: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->onRefreshComplete()V
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$200(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)V

    .line 238
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mPage:I
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$400(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)I

    move-result v0

    const/4 v1, 0x1

    if-ge v0, v1, :cond_3c

    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mAlbumHolderModels:Ljava/util/List;
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$500(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_3c

    .line 239
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mLoadingFailView:Landroid/view/View;
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$800(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 240
    iget-object v0, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mLoadingFailView:Landroid/view/View;
    invoke-static {v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$800(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5$2;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5$2;-><init>(Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 248
    :cond_3c
    return-void
.end method

.method public bridge synthetic success(Ljava/lang/Object;Lretrofit/client/Response;)V
    .registers 3

    .prologue
    .line 199
    check-cast p1, Lorg/json/JSONObject;

    invoke-virtual {p0, p1, p2}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->success(Lorg/json/JSONObject;Lretrofit/client/Response;)V

    return-void
.end method

.method public success(Lorg/json/JSONObject;Lretrofit/client/Response;)V
    .registers 10
    .param p1, "jsonObject"    # Lorg/json/JSONObject;
    .param p2, "response"    # Lretrofit/client/Response;

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 202
    iget-object v5, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    const-string v6, "has_next"

    invoke-virtual {p1, v6}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v6

    if-eqz v6, :cond_d

    move v3, v4

    :cond_d
    # setter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mHasNext:Z
    invoke-static {v5, v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$302(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;Z)Z

    .line 204
    const-string v3, "albums"

    invoke-virtual {p1, v3}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 205
    .local v1, "albumJsonArray":Lorg/json/JSONArray;
    invoke-static {v1}, Lcom/brixd/niceapp/model/AlbumHolderModel;->parseAlbumHolderModels(Lorg/json/JSONArray;)Ljava/util/List;

    move-result-object v0

    .line 207
    .local v0, "albumHolderModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AlbumHolderModel;>;"
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mPage:I
    invoke-static {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$400(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)I

    move-result v3

    if-ne v3, v4, :cond_48

    .line 208
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # setter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mAlbumHolderModels:Ljava/util/List;
    invoke-static {v3, v0}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$502(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;Ljava/util/List;)Ljava/util/List;

    .line 210
    new-instance v3, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5$1;

    invoke-direct {v3, p0, v1}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5$1;-><init>(Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;Lorg/json/JSONArray;)V

    .line 215
    invoke-virtual {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5$1;->start()V

    .line 223
    :goto_2f
    const-class v4, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    monitor-enter v4

    .line 224
    :try_start_32
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mAlbumAdapter:Lcom/brixd/niceapp/activity/AlbumHistoryActivity$AlbumAdapter;
    invoke-static {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$600(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)Lcom/brixd/niceapp/activity/AlbumHistoryActivity$AlbumAdapter;

    move-result-object v3

    invoke-virtual {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$AlbumAdapter;->notifyDataSetChanged()V

    .line 225
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    const/4 v5, 0x0

    # setter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mIsRequesting:Z
    invoke-static {v3, v5}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$702(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;Z)Z

    .line 226
    monitor-exit v4
    :try_end_42
    .catchall {:try_start_32 .. :try_end_42} :catchall_5f

    .line 228
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # invokes: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->onRefreshComplete()V
    invoke-static {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$200(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)V

    .line 229
    return-void

    .line 217
    :cond_48
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 218
    .local v2, "list":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AlbumHolderModel;>;"
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # getter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mAlbumHolderModels:Ljava/util/List;
    invoke-static {v3}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$500(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;)Ljava/util/List;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 219
    invoke-interface {v2, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 220
    iget-object v3, p0, Lcom/brixd/niceapp/activity/AlbumHistoryActivity$5;->this$0:Lcom/brixd/niceapp/activity/AlbumHistoryActivity;

    # setter for: Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->mAlbumHolderModels:Ljava/util/List;
    invoke-static {v3, v2}, Lcom/brixd/niceapp/activity/AlbumHistoryActivity;->access$502(Lcom/brixd/niceapp/activity/AlbumHistoryActivity;Ljava/util/List;)Ljava/util/List;

    goto :goto_2f

    .line 226
    .end local v2    # "list":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AlbumHolderModel;>;"
    :catchall_5f
    move-exception v3

    :try_start_60
    monitor-exit v4
    :try_end_61
    .catchall {:try_start_60 .. :try_end_61} :catchall_5f

    throw v3
.end method
